using System;
using System.Collections;
using System.Collections.Generic;
using Unity.VisualScripting;
using UnityEngine;
namespace Framework
{
    public interface ISingeleton
    {
        void Init();
    }

    public abstract class Singleton<T> where T : ISingeleton, new()
    {
        private static T instance;
        public static T Instance
        {
            get
            {
                if (instance == null)
                {
                    instance = new Lazy<T>(true).Value;
                    instance.Init();
                }
                return instance;
            }
        }
    }
}